#include "Components.h"

mtBEGIN(ComponentADef)
	mtCONSTRUCTOR();
	mtVARIABLE(field1);
	mtVARIABLE(field2);
mtEND

mtBEGIN(ComponentA)
	mtBASE(ECS::Component);
	mtCONSTRUCTOR();
	mtVARIABLE(field1);
	mtVARIABLE(field2);
	mtMETHOD(initWith);
mtEND

bool ComponentA::initWith( ComponentADef* def )
{
	field1 = def->field1.hasValue() ? def->field1.value() : 0;
	field2 = def->field2.hasValue() ? def->field2.value() : 0;
	return true;
}

